/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow
 */

import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View, TouchableHighlight} from 'react-native';
import DetailsScreen from './modules/DetailsScreen'
import HomeScreen from './modules/HomeScreen'
import Sample from './modules/Sample'

import {createStackNavigator,} from 'react-navigation';

const RootStack = createStackNavigator(
    {
        Home: HomeScreen,
        Sample: Sample,
        Details: DetailsScreen,
    },
    {
        initialRouteName: 'Home',
        /* The header config from HomeScreen is now here */
        // 定义所有页面的 header 的样式
        navigationOptions: {
            headerStyle: {
                backgroundColor: '#f4511e',
            },
            headerTintColor: '#fff',
            headerTitleStyle: {
                fontWeight: 'normal',
            },
        }
    }
);

export default class App extends React.Component {
    render() {
        return <RootStack/>;
    }
}


export const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#F5FCFF',
    },
    welcome: {
        fontSize: 20,
        textAlign: 'center',
        margin: 10,
    },
    instructions: {
        textAlign: 'center',
        color: '#333333',
        marginBottom: 5,
    }, button: {
        color: "#666",
        marginLeft: 16,
        marginRight: 16,
        marginTop: 10,
        fontSize: 16,
        padding: 8,
        backgroundColor: "#ddfafa",
        borderRadius: 8,

    },
    text: {margin: 10}
});



